package com.xiaor.rssevent.service.impl;

import com.xiaor.rssevent.dao.EventDao;
import com.xiaor.rssmodel.model.Event;
import com.xiaor.rssevent.service.EventService;
import com.xiaor.rssutils.pager.Page;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EventServiceImpl implements EventService {
    @Autowired
    private EventDao eventDao;
    private static Logger logger = LoggerFactory.getLogger(EventServiceImpl.class);

    @Override
    public Event findByName(Event event) {
        logger.info("findByName");
        return eventDao.findByName(event);
    }

    @Override
    public List<Event> findAll(Page page) {
        logger.info("findAll");
        return eventDao.findAll(page);
    }

    @Override
    public List<Event> findSimpleAll(Page page) {
        logger.info("findSimpleAll");
        return eventDao.findSimpleAll(page);
    }
}
